#pragma once
#include<d3d9.h>
#include<d3dx9.h>
class FWTexture;
class FWSprite
{
private:
	LPD3DXSPRITE _sprite;
	FWTexture* _texture;
	int _index;
	int _spriteCount;
	int _spritePerRow;
	D3DXVECTOR2 center;
public:
	FWSprite(FWTexture* t, int spritePerRow,int spriteCount);
	void reset(int index);
	void next();
	void render(D3DXVECTOR2 position);
	void draw();
	FWTexture* getTexture();
	FWSprite(void);
	~FWSprite(void);
};

